<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>

<h2>Project report: ${project.name}</h2>

<p><a href="products.htm">&lt; Back to products</a><br />
<a href="projectReport.htm?id=${projectId}">Show iterations report</a></p>

<h3>Description</h3>
${project.description}

<h3>Stories</h3>

<div style="margin: 2em;min-width: 700px;">
  <table border="1" style="">
  <tr>
      <th width="30%">Story</th>
      <th width="10%">Assignees</th>
      <th width="10%">State</th>
      <th>Description</th>
  </tr>
  <c:forEach items="${stories}" var="story">
  <tr>
      <td width="30%">${story.name}</td>
      <td width="10%">
          <c:forEach items="${story.responsibles.user}" var="u">
          ${u.initials}
          </c:forEach>
      </td>
      <td width="10%" class="storyState${story.state}"><fmt:message key="story.state.${story.state}" /></td>
      <td>${story.description}</td>
  </tr>
  </c:forEach>
  </table>
</div>